package com.schoolcloud.share.controller;

import com.schoolcloud.common.model.R;
import com.schoolcloud.share.entity.Comments;
import com.schoolcloud.share.service.CommentsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/share/video/comment")
@RequiredArgsConstructor
public class ShareVideoCommentController {
    private final CommentsService commentsService;
    @PostMapping
    public R<?> createComment(@RequestBody Comments comment){
        commentsService.createComment(comment);
        return R.ok().setMsg("评论成功！");
    }
}
